home *** CD-ROM | disk | FTP | other *** search
/ SGI Freeware 1999 August / SGI Freeware 1999 August.iso / dist / fw_xemacs.idb / usr / freeware / lib / xemacs-20.4 / info / lispref.info-35.z / lispref.info-35
Encoding:
GNU Info File  |  1998-05-21  |  49.3 KB  |  1,240 lines

  1. This is Info file ../../info/lispref.info, produced by Makeinfo version
  2. 1.68 from the input file lispref.texi.
  3.  
  4.    Edition History:
  5.  
  6.    GNU Emacs Lisp Reference Manual Second Edition (v2.01), May 1993 GNU
  7. Emacs Lisp Reference Manual Further Revised (v2.02), August 1993 Lucid
  8. Emacs Lisp Reference Manual (for 19.10) First Edition, March 1994
  9. XEmacs Lisp Programmer's Manual (for 19.12) Second Edition, April 1995
  10. GNU Emacs Lisp Reference Manual v2.4, June 1995 XEmacs Lisp
  11. Programmer's Manual (for 19.13) Third Edition, July 1995 XEmacs Lisp
  12. Reference Manual (for 19.14 and 20.0) v3.1, March 1996 XEmacs Lisp
  13. Reference Manual (for 19.15 and 20.1, 20.2) v3.2, April, May 1997
  14.  
  15.    Copyright (C) 1990, 1991, 1992, 1993, 1994, 1995 Free Software
  16. Foundation, Inc.  Copyright (C) 1994, 1995 Sun Microsystems, Inc.
  17. Copyright (C) 1995, 1996 Ben Wing.
  18.  
  19.    Permission is granted to make and distribute verbatim copies of this
  20. manual provided the copyright notice and this permission notice are
  21. preserved on all copies.
  22.  
  23.    Permission is granted to copy and distribute modified versions of
  24. this manual under the conditions for verbatim copying, provided that the
  25. entire resulting derived work is distributed under the terms of a
  26. permission notice identical to this one.
  27.  
  28.    Permission is granted to copy and distribute translations of this
  29. manual into another language, under the above conditions for modified
  30. versions, except that this permission notice may be stated in a
  31. translation approved by the Foundation.
  32.  
  33.    Permission is granted to copy and distribute modified versions of
  34. this manual under the conditions for verbatim copying, provided also
  35. that the section entitled "GNU General Public License" is included
  36. exactly as in the original, and provided that the entire resulting
  37. derived work is distributed under the terms of a permission notice
  38. identical to this one.
  39.  
  40.    Permission is granted to copy and distribute translations of this
  41. manual into another language, under the above conditions for modified
  42. versions, except that the section entitled "GNU General Public License"
  43. may be included in a translation approved by the Free Software
  44. Foundation instead of in the original English.
  45.  
  46. 
  47. File: lispref.info,  Node: Glyph Types,  Next: Mouse Pointer,  Prev: Images,  Up: Glyphs
  48.  
  49. Glyph Types
  50. ===========
  51.  
  52.    Each glyph has a particular type, which controls how the glyph's
  53. image is generated.  Each glyph type has a corresponding list of
  54. allowable image instance types that can be generated.  When you call
  55. `glyph-image-instance' to retrieve the image instance of a glyph,
  56. XEmacs does the equivalent of calling `make-image-instance' and passing
  57. in DEST-TYPES the list of allowable image instance types for the
  58. glyph's type.
  59.  
  60.    * `buffer' glyphs can be used as the begin-glyph or end-glyph of an
  61.      extent, in the modeline, and in the toolbar.  Their image can be
  62.      instantiated as `nothing', `mono-pixmap', `color-pixmap', `text',
  63.      and `subwindow'.
  64.  
  65.    * `pointer' glyphs can be used to specify the mouse pointer.  Their
  66.      image can be instantiated as `pointer'.
  67.  
  68.    * `icon' glyphs can be used to specify the icon used when a frame is
  69.      iconified.  Their image can be instantiated as `mono-pixmap' and
  70.      `color-pixmap'.
  71.  
  72.  - Function: glyph-type GLYPH
  73.      This function returns the type of the given glyph.  The return
  74.      value will be a symbol, one of `buffer', `pointer', or `icon'.
  75.  
  76.  - Function: valid-glyph-type-p GLYPH-TYPE
  77.      Given a GLYPH-TYPE, this function returns non-`nil' if it is valid.
  78.  
  79.  - Function: glyph-type-list
  80.      This function returns a list of valid glyph types.
  81.  
  82.  - Function: buffer-glyph-p OBJECT
  83.      This function returns non-`nil' if OBJECT is a glyph of type
  84.      `buffer'.
  85.  
  86.  - Function: icon-glyph-p OBJECT
  87.      This function returns non-`nil' if OBJECT is a glyph of type
  88.      `icon'.
  89.  
  90.  - Function: pointer-glyph-p OBJECT
  91.      This function returns non-`nil' if OBJECT is a glyph of type
  92.      `pointer'.
  93.  
  94. 
  95. File: lispref.info,  Node: Mouse Pointer,  Next: Redisplay Glyphs,  Prev: Glyph Types,  Up: Glyphs
  96.  
  97. Mouse Pointer
  98. =============
  99.  
  100.    The shape of the mouse pointer when over a particular section of a
  101. frame is controlled using various glyph variables.  Since the image of
  102. a glyph is a specifier, it can be controlled on a per-buffer,
  103. per-frame, per-window, or per-device basis.
  104.  
  105.    You should use `set-glyph-image' to set the following variables,
  106. *not* `setq'.
  107.  
  108.  - Glyph: text-pointer-glyph
  109.      This variable specifies the shape of the mouse pointer when over
  110.      text.
  111.  
  112.  - Glyph: nontext-pointer-glyph
  113.      This variable specifies the shape of the mouse pointer when over a
  114.      buffer, but not over text.  If unspecified in a particular domain,
  115.      `text-pointer-glyph' is used.
  116.  
  117.  - Glyph: modeline-pointer-glyph
  118.      This variable specifies the shape of the mouse pointer when over
  119.      the modeline.  If unspecified in a particular domain,
  120.      `nontext-pointer-glyph' is used.
  121.  
  122.  - Glyph: selection-pointer-glyph
  123.      This variable specifies the shape of the mouse pointer when over a
  124.      selectable text region.  If unspecified in a particular domain,
  125.      `text-pointer-glyph' is used.
  126.  
  127.  - Glyph: gc-pointer-glyph
  128.      This variable specifies the shape of the mouse pointer when a
  129.      garbage collection is in progress.  If the selected window is on a
  130.      window system and this glyph specifies a value (i.e. a pointer
  131.      image instance) in the domain of the selected window, the pointer
  132.      will be changed as specified during garbage collection.
  133.      Otherwise, a message will be printed in the echo area, as
  134.      controlled by `gc-message'.
  135.  
  136.  - Glyph: busy-pointer-glyph
  137.      This variable specifies the shape of the mouse pointer when XEmacs
  138.      is busy.  If unspecified in a particular domain, the pointer is
  139.      not changed when XEmacs is busy.
  140.  
  141.  - Glyph: menubar-pointer-glyph
  142.      This variable specifies the shape of the mouse pointer when over
  143.      the menubar.  If unspecified in a particular domain, the
  144.      window-system-provided default pointer is used.
  145.  
  146.  - Glyph: scrollbar-pointer-glyph
  147.      This variable specifies the shape of the mouse pointer when over a
  148.      scrollbar.  If unspecified in a particular domain, the
  149.      window-system-provided default pointer is used.
  150.  
  151.  - Glyph: toolbar-pointer-glyph
  152.      This variable specifies the shape of the mouse pointer when over a
  153.      toolbar.  If unspecified in a particular domain,
  154.      `nontext-pointer-glyph' is used.
  155.  
  156.    Internally, these variables are implemented in
  157. `default-mouse-motion-handler', and thus only take effect when the
  158. mouse moves.  That function calls `set-frame-pointer', which sets the
  159. current mouse pointer for a frame.
  160.  
  161.  - Function: set-frame-pointer FRAME IMAGE-INSTANCE
  162.      This function sets the mouse pointer of FRAME to the given pointer
  163.      image instance.  You should not call this function directly.  (If
  164.      you do, the pointer will change again the next time the mouse
  165.      moves.)
  166.  
  167. 
  168. File: lispref.info,  Node: Redisplay Glyphs,  Next: Subwindows,  Prev: Mouse Pointer,  Up: Glyphs
  169.  
  170. Redisplay Glyphs
  171. ================
  172.  
  173.  - Glyph: truncation-glyph
  174.      This variable specifies what is displayed at the end of truncated
  175.      lines.
  176.  
  177.  - Glyph: continuation-glyph
  178.      This variable specifies what is displayed at the end of wrapped
  179.      lines.
  180.  
  181.  - Glyph: octal-escape-glyph
  182.      This variable specifies what to prefix character codes displayed
  183.      in octal with.
  184.  
  185.  - Glyph: hscroll-glyph
  186.      This variable specifies what to display at the beginning of
  187.      horizontally scrolled lines.
  188.  
  189.  - Glyph: invisible-text-glyph
  190.      This variable specifies what to use to indicate the presence of
  191.      invisible text.  This is the glyph that is displayed when an
  192.      ellipsis is called for, according to `selective-display-ellipses'
  193.      or `buffer-invisibility-spec').  Normally this is three dots
  194.      ("...").
  195.  
  196.  - Glyph: control-arrow-glyph
  197.      This variable specifies what to use as an arrow for control
  198.      characters.
  199.  
  200. 
  201. File: lispref.info,  Node: Subwindows,  Prev: Redisplay Glyphs,  Up: Glyphs
  202.  
  203. Subwindows
  204. ==========
  205.  
  206.    Subwindows are not currently implemented.
  207.  
  208.  - Function: subwindowp OBJECT
  209.      This function returns non-`nil' if OBJECT is a subwindow.
  210.  
  211. 
  212. File: lispref.info,  Node: Annotations,  Next: Display,  Prev: Glyphs,  Up: Top
  213.  
  214. Annotations
  215. ***********
  216.  
  217.    An "annotation" is a pixmap or string that is not part of a buffer's
  218. text but is displayed next to a particular location in a buffer.
  219. Annotations can be displayed intermixed with text, in any whitespace at
  220. the beginning or end of a line, or in a special area at the left or
  221. right side of the frame called a "margin", whose size is controllable.
  222. Annotations are implemented using extents (*note Extents::.); but you
  223. can work with annotations without knowing how extents work.
  224.  
  225. * Menu:
  226.  
  227. * Annotation Basics::        Introduction to annotations.
  228. * Annotation Primitives::    Creating and deleting annotations.
  229. * Annotation Properties::    Retrieving and changing the characteristics
  230.                   of an annotation.
  231. * Margin Primitives::        Controlling the size of the margins.
  232. * Locating Annotations::    Looking for annotations in a buffer.
  233. * Annotation Hooks::        Hooks called at certain times during an
  234.                   annotation's lifetime.
  235.  
  236. 
  237. File: lispref.info,  Node: Annotation Basics,  Next: Annotation Primitives,  Up: Annotations
  238.  
  239. Annotation Basics
  240. =================
  241.  
  242.    Marginal annotations are notes associated with a particular location
  243. in a buffer.  They may be displayed in a margin created on the
  244. left-hand or right-hand side of the frame, in any whitespace at the
  245. beginning or end of a line, or inside of the text itself.  Every
  246. annotation may have an associated action to be performed when the
  247. annotation is selected.  The term "annotation" is used to refer to an
  248. individual note.  The term "margin" is generically used to refer to the
  249. whitespace before the first character on a line or after the last
  250. character on a line.
  251.  
  252.    Each annotation has the following characteristics:
  253. GLYPH
  254.      This is a glyph object and is used as the displayed representation
  255.      of the annotation.
  256.  
  257. DOWN-GLYPH
  258.      If given, this glyph is used as the displayed representation of
  259.      the annotation when the mouse is pressed down over the annotation.
  260.  
  261. FACE
  262.      The face with which to display the glyph.
  263.  
  264. SIDE
  265.      Which side of the text (left or right) the annotation is displayed
  266.      at.
  267.  
  268. ACTION
  269.      If non-`nil', this field must contain a function capable of being
  270.      the first argument to `funcall'.  This function is normally
  271.      evaluated with a single argument, the value of the DATA field,
  272.      each time the annotation is selected.  However, if the WITH-EVENT
  273.      parameter to `make-annotation' is non-`nil', the function is
  274.      called with two arguments.  The first argument is the same as
  275.      before, and the second argument is the event (a button-up event,
  276.      usually) that activated the annotation.
  277.  
  278. DATA
  279.      Not used internally.  This field can contain any E-Lisp object.
  280.      It is passed as the first argument to ACTION described above.
  281.  
  282. MENU
  283.      A menu displayed when the right mouse button is pressed over the
  284.      annotation.
  285.  
  286.    The margin is divided into "outside" and "inside".  The outside
  287. margin is space on the left or right side of the frame which normal text
  288. cannot be displayed in.  The inside margin is that space between the
  289. leftmost or rightmost point at which text can be displayed and where the
  290. first or last character actually is.
  291.  
  292.    There are four different "layout types" which affect the exact
  293. location an annotation appears.
  294.  
  295. `outside-margin'
  296.      The annotation is placed in the outside margin area. as close as
  297.      possible to the edge of the frame.  If the outside margin is not
  298.      wide enough for an annotation to fit, it is not displayed.
  299.  
  300. `inside-margin'
  301.      The annotation is placed in the inside margin area, as close as
  302.      possible to the edge of the frame.  If the inside margin is not
  303.      wide enough for the annotation to fit, it will be displayed using
  304.      any available outside margin space if and only if the specifier
  305.      `use-left-overflow' or `use-right-overflow' (depending on which
  306.      side the annotation appears in) is non-`nil'.
  307.  
  308. `whitespace'
  309.      The annotation is placed in the inside margin area, as close as
  310.      possible to the first or last non-whitespace character on a line.
  311.      If the inside margin is not wide enough for the annotation to fit,
  312.      it will be displayed if and only if the specifier
  313.      `use-left-overflow' or `use-right-overflow' (depending on which
  314.      side the annotation appears in) is non-`nil'.
  315.  
  316. `text'
  317.      The annotation is placed at the position it is inserted.  It will
  318.      create enough space for itself inside of the text area.  It does
  319.      not take up a place in the logical buffer, only in the display of
  320.      the buffer.
  321.  
  322.    The current layout policy is that all `whitespace' annotations are
  323. displayed first.  Next, all `inside-margin' annotations are displayed
  324. using any remaining space.  Finally as many `outside-margin'
  325. annotations are displayed as possible.  The `text' annotations will
  326. always display as they create their own space to display in.
  327.  
  328. 
  329. File: lispref.info,  Node: Annotation Primitives,  Next: Annotation Properties,  Prev: Annotation Basics,  Up: Annotations
  330.  
  331. Annotation Primitives
  332. =====================
  333.  
  334.  - Function: make-annotation GLYPH &optional POSITION LAYOUT BUFFER
  335.           WITH-EVENT D-GLYPH RIGHTP
  336.      This function creates a marginal annotation at position POS in
  337.      BUFFER.  The annotation is displayed using GLYPH, which should be
  338.      a glyph object or a string, and is positioned using layout policy
  339.      LAYOUT.  If POS is `nil', point is used.  If LAYOUT is `nil',
  340.      `whitespace' is used.  If BUFFER is `nil', the current buffer is
  341.      used.
  342.  
  343.      If WITH-EVENT is non-`nil', then when an annotation is activated,
  344.      the triggering event is passed as the second arg to the annotation
  345.      function.  If D-GLYPH is non-`nil' then it is used as the glyph
  346.      that will be displayed when button1 is down.  If RIGHTP is
  347.      non-`nil' then the glyph will be displayed on the right side of
  348.      the buffer instead of the left.
  349.  
  350.      The newly created annotation is returned.
  351.  
  352.  - Function: delete-annotation ANNOTATION
  353.      This function removes ANNOTATION from its buffer.  This does not
  354.      modify the buffer text.
  355.  
  356.  - Function: annotationp ANNOTATION
  357.      This function returns `t' if ANNOTATION is an annotation, `nil'
  358.      otherwise.
  359.  
  360. 
  361. File: lispref.info,  Node: Annotation Properties,  Next: Margin Primitives,  Prev: Annotation Primitives,  Up: Annotations
  362.  
  363. Annotation Properties
  364. =====================
  365.  
  366.  - Function: annotation-glyph ANNOTATION
  367.      This function returns the glyph object used to display ANNOTATION.
  368.  
  369.  - Function: set-annotation-glyph ANNOTATION GLYPH &optional LAYOUT SIDE
  370.      This function sets the glyph of ANNOTATION to GLYPH, which should
  371.      be a glyph object.  If LAYOUT is non-`nil', set the layout policy
  372.      of ANNOTATION to LAYOUT.  If SIDE is `left' or `right', change the
  373.      side of the buffer at which the annotation is displayed to the
  374.      given side.  The new value of `annotation-glyph' is returned.
  375.  
  376.  - Function: annotation-down-glyph ANNOTATION
  377.      This function returns the glyph used to display ANNOTATION when
  378.      the left mouse button is depressed on the annotation.
  379.  
  380.  - Function: set-annotation-down-glyph ANNOTATION GLYPH
  381.      This function returns the glyph used to display ANNOTATION when
  382.      the left mouse button is depressed on the annotation to GLYPH,
  383.      which should be a glyph object.
  384.  
  385.  - Function: annotation-face ANNOTATION
  386.      This function returns the face associated with ANNOTATION.
  387.  
  388.  - Function: set-annotation-face ANNOTATION FACE
  389.      This function sets the face associated with ANNOTATION to FACE.
  390.  
  391.  - Function: annotation-layout ANNOTATION
  392.      This function returns the layout policy of ANNOTATION.
  393.  
  394.  - Function: set-annotation-layout ANNOTATION LAYOUT
  395.      This function sets the layout policy of ANNOTATION to LAYOUT.
  396.  
  397.  - Function: annotation-side ANNOTATION
  398.      This function returns the side of the buffer that ANNOTATION is
  399.      displayed on.  Return value is a symbol, either `left' or `right'.
  400.  
  401.  - Function: annotation-data ANNOTATION
  402.      This function returns the data associated with ANNOTATION.
  403.  
  404.  - Function: set-annotation-data ANNOTATION DATA
  405.      This function sets the data field of ANNOTATION to DATA.  DATA is
  406.      returned.
  407.  
  408.  - Function: annotation-action ANNOTATION
  409.      This function returns the action associated with ANNOTATION.
  410.  
  411.  - Function: set-annotation-action ANNOTATION ACTION
  412.      This function sets the action field of ANNOTATION to ACTION.
  413.      ACTION is returned..
  414.  
  415.  - Function: annotation-menu ANNOTATION
  416.      This function returns the menu associated with ANNOTATION.
  417.  
  418.  - Function: set-annotation-menu ANNOTATION MENU
  419.      This function sets the menu associated with ANNOTATION to MENU.
  420.      This menu will be displayed when the right mouse button is pressed
  421.      over the annotation.
  422.  
  423.  - Function: annotation-visible ANNOTATION
  424.      This function returns `t' if there is enough available space to
  425.      display ANNOTATION, `nil' otherwise.
  426.  
  427.  - Function: annotation-width ANNOTATION
  428.      This function returns the width of ANNOTATION in pixels.
  429.  
  430.  - Function: hide-annotation ANNOTATION
  431.      This function removes ANNOTATION's glyph, making it invisible.
  432.  
  433.  - Function: reveal-annotation ANNOTATION
  434.      This function restores ANNOTATION's glyph, making it visible.
  435.  
  436. 
  437. File: lispref.info,  Node: Locating Annotations,  Next: Annotation Hooks,  Prev: Margin Primitives,  Up: Annotations
  438.  
  439. Locating Annotations
  440. ====================
  441.  
  442.  - Function: annotations-in-region START END BUFFER
  443.      This function returns a list of all annotations in BUFFER which
  444.      are between START and END inclusively.
  445.  
  446.  - Function: annotations-at &optional POSITION BUFFER
  447.      This function returns a list of all annotations at POSITION in
  448.      BUFFER.  If POSITION is `nil' point is used.  If BUFFER is `nil'
  449.      the current buffer is used.
  450.  
  451.  - Function: annotation-list &optional BUFFER
  452.      This function returns a list of all annotations in BUFFER.  If
  453.      BUFFER is `nil', the current buffer is used.
  454.  
  455.  - Function: all-annotations
  456.      This function returns a list of all annotations in all buffers in
  457.      existence.
  458.  
  459. 
  460. File: lispref.info,  Node: Margin Primitives,  Next: Locating Annotations,  Prev: Annotation Properties,  Up: Annotations
  461.  
  462. Margin Primitives
  463. =================
  464.  
  465.    The margin widths are controllable on a buffer-local, window-local,
  466. frame-local, device-local, or device-type-local basis through the use
  467. of specifiers.  *Note Specifiers::.
  468.  
  469.  - Specifier: left-margin-width
  470.      This is a specifier variable controlling the width of the left
  471.      outside margin, in characters.  Use `set-specifier' to change its
  472.      value.
  473.  
  474.  - Specifier: right-margin-width
  475.      This is a specifier variable controlling the width of the right
  476.      outside margin, in characters.  Use `set-specifier' to change its
  477.      value.
  478.  
  479.  - Specifier: use-left-overflow
  480.      If non-`nil', use the left outside margin as extra whitespace when
  481.      displaying `whitespace' and `inside-margin' annotations.  Defaults
  482.      to `nil'.  This is a specifier variable; use `set-specifier' to
  483.      change its value.
  484.  
  485.  - Specifier: use-right-overflow
  486.      If non-`nil', use the right outside margin as extra whitespace when
  487.      displaying `whitespace' and `inside-margin' annotations.  Defaults
  488.      to `nil'.  This is a specifier variable; use `set-specifier' to
  489.      change its value.
  490.  
  491.  - Function: window-left-margin-pixel-width &optional WINDOW
  492.      This function returns the width in pixels of the left outside
  493.      margin of WINDOW.  If WINDOW is `nil', the selected window is
  494.      assumed.
  495.  
  496.  - Function: window-right-margin-pixel-width &optional WINDOW
  497.      This function returns the width in pixels of the right outside
  498.      margin of WINDOW.  If WINDOW is `nil', the selected window is
  499.      assumed.
  500.  
  501.    The margin colors are controlled by the faces `left-margin' and
  502. `right-margin'.  These can be set using the X resources
  503. `Emacs.left-margin.background' and `Emacs.left-margin.foreground';
  504. likewise for the right margin.
  505.  
  506. 
  507. File: lispref.info,  Node: Annotation Hooks,  Prev: Locating Annotations,  Up: Annotations
  508.  
  509. Annotation Hooks
  510. ================
  511.  
  512.    The following three hooks are provided for use with the marginal
  513. annotations:
  514.  
  515. `before-delete-annotation-hook'
  516.      This hook is called immediately before an annotation is destroyed.
  517.      It is passed a single argument, the annotation being destroyed.
  518.  
  519. `after-delete-annotation-hook'
  520.      This normal hook is called immediately after an annotation is
  521.      destroyed.
  522.  
  523. `make-annotation-hook'
  524.      This hook is called immediately after an annotation is created.
  525.      It is passed a single argument, the newly created annotation.
  526.  
  527. 
  528. File: lispref.info,  Node: Display,  Next: Hash Tables,  Prev: Annotations,  Up: Top
  529.  
  530. Emacs Display
  531. *************
  532.  
  533.    This chapter describes a number of other features related to the
  534. display that XEmacs presents to the user.
  535.  
  536. * Menu:
  537.  
  538. * Refresh Screen::      Clearing the screen and redrawing everything on it.
  539. * Truncation::          Folding or wrapping long text lines.
  540. * The Echo Area::       Where messages are displayed.
  541. * Invisible Text::      Hiding part of the buffer text.
  542. * Selective Display::   Hiding part of the buffer text (the old way).
  543. * Overlay Arrow::       Display of an arrow to indicate position.
  544. * Temporary Displays::  Displays that go away automatically.
  545. * Blinking::            How XEmacs shows the matching open parenthesis.
  546. * Usual Display::    The usual conventions for displaying nonprinting chars.
  547. * Display Tables::    How to specify other conventions.
  548. * Beeping::             Audible signal to the user.
  549.  
  550. 
  551. File: lispref.info,  Node: Refresh Screen,  Next: Truncation,  Up: Display
  552.  
  553. Refreshing the Screen
  554. =====================
  555.  
  556.    The function `redraw-frame' redisplays the entire contents of a
  557. given frame.  *Note Frames::.
  558.  
  559.  - Function: redraw-frame FRAME
  560.      This function clears and redisplays frame FRAME.
  561.  
  562.    Even more powerful is `redraw-display':
  563.  
  564.  - Command: redraw-display &optional DEVICE
  565.      This function redraws all frames on DEVICE marked as having their
  566.      image garbled.  DEVICE defaults to the selected device.  If DEVICE
  567.      is `t', all devices will have their frames checked.
  568.  
  569.    Processing user input takes absolute priority over redisplay.  If you
  570. call these functions when input is available, they do nothing
  571. immediately, but a full redisplay does happen eventually--after all the
  572. input has been processed.
  573.  
  574.    Normally, suspending and resuming XEmacs also refreshes the screen.
  575. Some terminal emulators record separate contents for display-oriented
  576. programs such as XEmacs and for ordinary sequential display.  If you are
  577. using such a terminal, you might want to inhibit the redisplay on
  578. resumption.  *Note Suspending XEmacs::.
  579.  
  580.  - Variable: no-redraw-on-reenter
  581.      This variable controls whether XEmacs redraws the entire screen
  582.      after it has been suspended and resumed.  Non-`nil' means yes,
  583.      `nil' means no.
  584.  
  585.    The above functions do not actually cause the display to be updated;
  586. rather, they clear out the internal display records that XEmacs
  587. maintains, so that the next time the display is updated it will be
  588. redrawn from scratch.  Normally this occurs the next time that
  589. `next-event' or `sit-for' is called; however, a display update will not
  590. occur if there is input pending.  *Note Command Loop::.
  591.  
  592.  - Command: force-redisplay
  593.      This function causes an immediate update of the display in all
  594.      circumstances, whether or not input is pending. (This function does
  595.      not exist in FSF Emacs.)
  596.  
  597.  - Function: force-cursor-redisplay
  598.      This function causes an immediate update of the cursor on the
  599.      selected frame. (This function does not exist in FSF Emacs.)
  600.  
  601. 
  602. File: lispref.info,  Node: Truncation,  Next: The Echo Area,  Prev: Refresh Screen,  Up: Display
  603.  
  604. Truncation
  605. ==========
  606.  
  607.    When a line of text extends beyond the right edge of a window, the
  608. line can either be truncated or continued on the next line.  When a line
  609. is truncated, this is normally shown with a `\' in the rightmost column
  610. of the window on X displays, and with a `$' on TTY devices.  When a
  611. line is continued or "wrapped" onto the next line, this is shown with a
  612. curved arrow in the rightmost column of the window (or with a `\' on
  613. TTY devices).  The additional screen lines used to display a long text
  614. line are called "continuation" lines.
  615.  
  616.    Normally, whenever line truncation is in effect for a particular
  617. window, a horizontal scrollbar is displayed in that window if the
  618. device supports scrollbars.  *Note Scrollbars::.
  619.  
  620.    Note that continuation is different from filling; continuation
  621. happens on the screen only, not in the buffer contents, and it breaks a
  622. line precisely at the right margin, not at a word boundary.  *Note
  623. Filling::.
  624.  
  625.  - User Option: truncate-lines
  626.      This buffer-local variable controls how XEmacs displays lines that
  627.      extend beyond the right edge of the window.  If it is non-`nil',
  628.      then XEmacs does not display continuation lines; rather each line
  629.      of text occupies exactly one screen line, and a backslash appears
  630.      at the edge of any line that extends to or beyond the edge of the
  631.      window.  The default is `nil'.
  632.  
  633.      If the variable `truncate-partial-width-windows' is non-`nil',
  634.      then truncation is always used for side-by-side windows (within one
  635.      frame) regardless of the value of `truncate-lines'.
  636.  
  637.  - User Option: default-truncate-lines
  638.      This variable is the default value for `truncate-lines', for
  639.      buffers that do not have local values for it.
  640.  
  641.  - User Option: truncate-partial-width-windows
  642.      This variable controls display of lines that extend beyond the
  643.      right edge of the window, in side-by-side windows (*note Splitting
  644.      Windows::.).  If it is non-`nil', these lines are truncated;
  645.      otherwise, `truncate-lines' says what to do with them.
  646.  
  647.    The backslash and curved arrow used to indicate truncated or
  648. continued lines are only defaults, and can be changed.  These images
  649. are actually glyphs (*note Glyphs::.).  XEmacs provides a great deal of
  650. flexibility in how glyphs can be controlled. (This differs from FSF
  651. Emacs, which uses display tables to control these images.)
  652.  
  653.    For details, *Note Redisplay Glyphs::.
  654.  
  655. 
  656. File: lispref.info,  Node: The Echo Area,  Next: Invisible Text,  Prev: Truncation,  Up: Display
  657.  
  658. The Echo Area
  659. =============
  660.  
  661.    The "echo area" is used for displaying messages made with the
  662. `message' primitive, and for echoing keystrokes.  It is not the same as
  663. the minibuffer, despite the fact that the minibuffer appears (when
  664. active) in the same place on the screen as the echo area.  The `XEmacs
  665. Reference Manual' specifies the rules for resolving conflicts between
  666. the echo area and the minibuffer for use of that screen space (*note
  667. The Minibuffer: (emacs)Minibuffer.).  Error messages appear in the echo
  668. area; see *Note Errors::.
  669.  
  670.    You can write output in the echo area by using the Lisp printing
  671. functions with `t' as the stream (*note Output Functions::.), or as
  672. follows:
  673.  
  674.  - Function: message STRING &rest ARGUMENTS
  675.      This function displays a one-line message in the echo area.  The
  676.      argument STRING is similar to a C language `printf' control
  677.      string.  See `format' in *Note String Conversion::, for the details
  678.      on the conversion specifications.  `message' returns the
  679.      constructed string.
  680.  
  681.      In batch mode, `message' prints the message text on the standard
  682.      error stream, followed by a newline.
  683.  
  684.      If STRING is `nil', `message' clears the echo area.  If the
  685.      minibuffer is active, this brings the minibuffer contents back onto
  686.      the screen immediately.
  687.  
  688.           (message "Minibuffer depth is %d."
  689.                    (minibuffer-depth))
  690.            -| Minibuffer depth is 0.
  691.           => "Minibuffer depth is 0."
  692.           
  693.           ---------- Echo Area ----------
  694.           Minibuffer depth is 0.
  695.           ---------- Echo Area ----------
  696.  
  697.    Some of the messages displayed in the echo area are also recorded in
  698. the ` *Message-Log*' buffer.
  699.  
  700.  - User Option: log-message-max-size
  701.      This variable specifies the maximum size of `* Message-Log*'
  702.      buffer.
  703.  
  704.  - Variable: echo-keystrokes
  705.      This variable determines how much time should elapse before command
  706.      characters echo.  Its value must be an integer, which specifies the
  707.      number of seconds to wait before echoing.  If the user types a
  708.      prefix key (such as `C-x') and then delays this many seconds before
  709.      continuing, the prefix key is echoed in the echo area.  Any
  710.      subsequent characters in the same command will be echoed as well.
  711.  
  712.      If the value is zero, then command input is not echoed.
  713.  
  714.  - Variable: cursor-in-echo-area
  715.      This variable controls where the cursor appears when a message is
  716.      displayed in the echo area.  If it is non-`nil', then the cursor
  717.      appears at the end of the message.  Otherwise, the cursor appears
  718.      at point--not in the echo area at all.
  719.  
  720.      The value is normally `nil'; Lisp programs bind it to `t' for
  721.      brief periods of time.
  722.  
  723. 
  724. File: lispref.info,  Node: Invisible Text,  Next: Selective Display,  Prev: The Echo Area,  Up: Display
  725.  
  726. Invisible Text
  727. ==============
  728.  
  729.    You can make characters "invisible", so that they do not appear on
  730. the screen, with the `invisible' property.  This can be either a text
  731. property or a property of an overlay.
  732.  
  733.    In the simplest case, any non-`nil' `invisible' property makes a
  734. character invisible.  This is the default case--if you don't alter the
  735. default value of `buffer-invisibility-spec', this is how the
  736. `invisibility' property works.  This feature is much like selective
  737. display (*note Selective Display::.), but more general and cleaner.
  738.  
  739.    More generally, you can use the variable `buffer-invisibility-spec'
  740. to control which values of the `invisible' property make text
  741. invisible.  This permits you to classify the text into different subsets
  742. in advance, by giving them different `invisible' values, and
  743. subsequently make various subsets visible or invisible by changing the
  744. value of `buffer-invisibility-spec'.
  745.  
  746.    Controlling visibility with `buffer-invisibility-spec' is especially
  747. useful in a program to display the list of entries in a data base.  It
  748. permits the implementation of convenient filtering commands to view
  749. just a part of the entries in the data base.  Setting this variable is
  750. very fast, much faster than scanning all the text in the buffer looking
  751. for properties to change.
  752.  
  753.  - Variable: buffer-invisibility-spec
  754.      This variable specifies which kinds of `invisible' properties
  755.      actually make a character invisible.
  756.  
  757.     `t'
  758.           A character is invisible if its `invisible' property is
  759.           non-`nil'.  This is the default.
  760.  
  761.     a list
  762.           Each element of the list makes certain characters invisible.
  763.           Ultimately, a character is invisible if any of the elements
  764.           of this list applies to it.  The list can have two kinds of
  765.           elements:
  766.  
  767.          `ATOM'
  768.                A character is invisible if its `invisible' propery value
  769.                is ATOM or if it is a list with ATOM as a member.
  770.  
  771.          `(ATOM . t)'
  772.                A character is invisible if its `invisible' propery value
  773.                is ATOM or if it is a list with ATOM as a member.
  774.                Moreover, if this character is at the end of a line and
  775.                is followed by a visible newline, it displays an
  776.                ellipsis.
  777.  
  778.    Ordinarily, commands that operate on text or move point do not care
  779. whether the text is invisible.  However, the user-level line motion
  780. commands explicitly ignore invisible newlines.
  781.  
  782. 
  783. File: lispref.info,  Node: Selective Display,  Next: Overlay Arrow,  Prev: Invisible Text,  Up: Display
  784.  
  785. Selective Display
  786. =================
  787.  
  788.    "Selective display" is a pair of features that hide certain lines on
  789. the screen.
  790.  
  791.    The first variant, explicit selective display, is designed for use in
  792. a Lisp program.  The program controls which lines are hidden by altering
  793. the text.  Outline mode has traditionally used this variant.  It has
  794. been partially replaced by the invisible text feature (*note Invisible
  795. Text::.); there is a new version of Outline mode which uses that
  796. instead.
  797.  
  798.    In the second variant, the choice of lines to hide is made
  799. automatically based on indentation.  This variant is designed to be a
  800. user-level feature.
  801.  
  802.    The way you control explicit selective display is by replacing a
  803. newline (control-j) with a carriage return (control-m).  The text that
  804. was formerly a line following that newline is now invisible.  Strictly
  805. speaking, it is temporarily no longer a line at all, since only newlines
  806. can separate lines; it is now part of the previous line.
  807.  
  808.    Selective display does not directly affect editing commands.  For
  809. example, `C-f' (`forward-char') moves point unhesitatingly into
  810. invisible text.  However, the replacement of newline characters with
  811. carriage return characters affects some editing commands.  For example,
  812. `next-line' skips invisible lines, since it searches only for newlines.
  813. Modes that use selective display can also define commands that take
  814. account of the newlines, or that make parts of the text visible or
  815. invisible.
  816.  
  817.    When you write a selectively displayed buffer into a file, all the
  818. control-m's are output as newlines.  This means that when you next read
  819. in the file, it looks OK, with nothing invisible.  The selective display
  820. effect is seen only within XEmacs.
  821.  
  822.  - Variable: selective-display
  823.      This buffer-local variable enables selective display.  This means
  824.      that lines, or portions of lines, may be made invisible.
  825.  
  826.         * If the value of `selective-display' is `t', then any portion
  827.           of a line that follows a control-m is not displayed.
  828.  
  829.         * If the value of `selective-display' is a positive integer,
  830.           then lines that start with more than that many columns of
  831.           indentation are not displayed.
  832.  
  833.      When some portion of a buffer is invisible, the vertical movement
  834.      commands operate as if that portion did not exist, allowing a
  835.      single `next-line' command to skip any number of invisible lines.
  836.      However, character movement commands (such as `forward-char') do
  837.      not skip the invisible portion, and it is possible (if tricky) to
  838.      insert or delete text in an invisible portion.
  839.  
  840.      In the examples below, we show the *display appearance* of the
  841.      buffer `foo', which changes with the value of `selective-display'.
  842.      The *contents* of the buffer do not change.
  843.  
  844.           (setq selective-display nil)
  845.                => nil
  846.           
  847.           ---------- Buffer: foo ----------
  848.           1 on this column
  849.            2on this column
  850.             3n this column
  851.             3n this column
  852.            2on this column
  853.           1 on this column
  854.           ---------- Buffer: foo ----------
  855.           
  856.           (setq selective-display 2)
  857.                => 2
  858.           
  859.           ---------- Buffer: foo ----------
  860.           1 on this column
  861.            2on this column
  862.            2on this column
  863.           1 on this column
  864.           ---------- Buffer: foo ----------
  865.  
  866.  - Variable: selective-display-ellipses
  867.      If this buffer-local variable is non-`nil', then XEmacs displays
  868.      `...' at the end of a line that is followed by invisible text.
  869.      This example is a continuation of the previous one.
  870.  
  871.           (setq selective-display-ellipses t)
  872.                => t
  873.           
  874.           ---------- Buffer: foo ----------
  875.           1 on this column
  876.            2on this column ...
  877.            2on this column
  878.           1 on this column
  879.           ---------- Buffer: foo ----------
  880.  
  881.      You can use a display table to substitute other text for the
  882.      ellipsis (`...').  *Note Display Tables::.
  883.  
  884. 
  885. File: lispref.info,  Node: Overlay Arrow,  Next: Temporary Displays,  Prev: Selective Display,  Up: Display
  886.  
  887. The Overlay Arrow
  888. =================
  889.  
  890.    The "overlay arrow" is useful for directing the user's attention to
  891. a particular line in a buffer.  For example, in the modes used for
  892. interface to debuggers, the overlay arrow indicates the line of code
  893. about to be executed.
  894.  
  895.  - Variable: overlay-arrow-string
  896.      This variable holds the string to display to call attention to a
  897.      particular line, or `nil' if the arrow feature is not in use.
  898.      Despite its name, the value of this variable can be either a string
  899.      or a glyph (*note Glyphs::.).
  900.  
  901.  - Variable: overlay-arrow-position
  902.      This variable holds a marker that indicates where to display the
  903.      overlay arrow.  It should point at the beginning of a line.  The
  904.      arrow text appears at the beginning of that line, overlaying any
  905.      text that would otherwise appear.  Since the arrow is usually
  906.      short, and the line usually begins with indentation, normally
  907.      nothing significant is overwritten.
  908.  
  909.      The overlay string is displayed only in the buffer that this marker
  910.      points into.  Thus, only one buffer can have an overlay arrow at
  911.      any given time.
  912.  
  913.    You can do the same job by creating an extent with a `begin-glyph'
  914. property.  *Note Extent Properties::.
  915.  
  916. 
  917. File: lispref.info,  Node: Temporary Displays,  Next: Blinking,  Prev: Overlay Arrow,  Up: Display
  918.  
  919. Temporary Displays
  920. ==================
  921.  
  922.    Temporary displays are used by commands to put output into a buffer
  923. and then present it to the user for perusal rather than for editing.
  924. Many of the help commands use this feature.
  925.  
  926.  - Special Form: with-output-to-temp-buffer BUFFER-NAME FORMS...
  927.      This function executes FORMS while arranging to insert any output
  928.      they print into the buffer named BUFFER-NAME.  The buffer is then
  929.      shown in some window for viewing, displayed but not selected.
  930.  
  931.      The string BUFFER-NAME specifies the temporary buffer, which need
  932.      not already exist.  The argument must be a string, not a buffer.
  933.      The buffer is erased initially (with no questions asked), and it is
  934.      marked as unmodified after `with-output-to-temp-buffer' exits.
  935.  
  936.      `with-output-to-temp-buffer' binds `standard-output' to the
  937.      temporary buffer, then it evaluates the forms in FORMS.  Output
  938.      using the Lisp output functions within FORMS goes by default to
  939.      that buffer (but screen display and messages in the echo area,
  940.      although they are "output" in the general sense of the word, are
  941.      not affected).  *Note Output Functions::.
  942.  
  943.      The value of the last form in FORMS is returned.
  944.  
  945.           ---------- Buffer: foo ----------
  946.            This is the contents of foo.
  947.           ---------- Buffer: foo ----------
  948.           
  949.           (with-output-to-temp-buffer "foo"
  950.               (print 20)
  951.               (print standard-output))
  952.           => #<buffer foo>
  953.           
  954.           ---------- Buffer: foo ----------
  955.           20
  956.           
  957.           #<buffer foo>
  958.           
  959.           ---------- Buffer: foo ----------
  960.  
  961.  - Variable: temp-buffer-show-function
  962.      If this variable is non-`nil', `with-output-to-temp-buffer' calls
  963.      it as a function to do the job of displaying a help buffer.  The
  964.      function gets one argument, which is the buffer it should display.
  965.  
  966.      In Emacs versions 18 and earlier, this variable was called
  967.      `temp-buffer-show-hook'.
  968.  
  969.  - Function: momentary-string-display STRING POSITION &optional CHAR
  970.           MESSAGE
  971.      This function momentarily displays STRING in the current buffer at
  972.      POSITION.  It has no effect on the undo list or on the buffer's
  973.      modification status.
  974.  
  975.      The momentary display remains until the next input event.  If the
  976.      next input event is CHAR, `momentary-string-display' ignores it
  977.      and returns.  Otherwise, that event remains buffered for
  978.      subsequent use as input.  Thus, typing CHAR will simply remove the
  979.      string from the display, while typing (say) `C-f' will remove the
  980.      string from the display and later (presumably) move point forward.
  981.      The argument CHAR is a space by default.
  982.  
  983.      The return value of `momentary-string-display' is not meaningful.
  984.  
  985.      You can do the same job in a more general way by creating an extent
  986.      with a begin-glyph property.  *Note Extent Properties::.
  987.  
  988.      If MESSAGE is non-`nil', it is displayed in the echo area while
  989.      STRING is displayed in the buffer.  If it is `nil', a default
  990.      message says to type CHAR to continue.
  991.  
  992.      In this example, point is initially located at the beginning of the
  993.      second line:
  994.  
  995.           ---------- Buffer: foo ----------
  996.           This is the contents of foo.
  997.           -!-Second line.
  998.           ---------- Buffer: foo ----------
  999.           
  1000.           (momentary-string-display
  1001.             "**** Important Message! ****"
  1002.             (point) ?\r
  1003.             "Type RET when done reading")
  1004.           => t
  1005.           
  1006.           ---------- Buffer: foo ----------
  1007.           This is the contents of foo.
  1008.           **** Important Message! ****Second line.
  1009.           ---------- Buffer: foo ----------
  1010.           
  1011.           ---------- Echo Area ----------
  1012.           Type RET when done reading
  1013.           ---------- Echo Area ----------
  1014.  
  1015.      This function works by actually changing the text in the buffer.
  1016.      As a result, if you later undo in this buffer, you will see the
  1017.      message come and go.
  1018.  
  1019. 
  1020. File: lispref.info,  Node: Blinking,  Next: Usual Display,  Prev: Temporary Displays,  Up: Display
  1021.  
  1022. Blinking Parentheses
  1023. ====================
  1024.  
  1025.    This section describes the mechanism by which XEmacs shows a matching
  1026. open parenthesis when the user inserts a close parenthesis.
  1027.  
  1028.  - Variable: blink-paren-function
  1029.      The value of this variable should be a function (of no arguments)
  1030.      to be called whenever a character with close parenthesis syntax is
  1031.      inserted.  The value of `blink-paren-function' may be `nil', in
  1032.      which case nothing is done.
  1033.  
  1034.           *Please note:* This variable was named `blink-paren-hook' in
  1035.           older Emacs versions, but since it is not called with the
  1036.           standard convention for hooks, it was renamed to
  1037.           `blink-paren-function' in version 19.
  1038.  
  1039.  - Variable: blink-matching-paren
  1040.      If this variable is `nil', then `blink-matching-open' does nothing.
  1041.  
  1042.  - Variable: blink-matching-paren-distance
  1043.      This variable specifies the maximum distance to scan for a matching
  1044.      parenthesis before giving up.
  1045.  
  1046.  - Variable: blink-matching-paren-delay
  1047.      This variable specifies the number of seconds for the cursor to
  1048.      remain at the matching parenthesis.  A fraction of a second often
  1049.      gives good results, but the default is 1, which works on all
  1050.      systems.
  1051.  
  1052.  - Function: blink-matching-open
  1053.      This function is the default value of `blink-paren-function'.  It
  1054.      assumes that point follows a character with close parenthesis
  1055.      syntax and moves the cursor momentarily to the matching opening
  1056.      character.  If that character is not already on the screen, it
  1057.      displays the character's context in the echo area.  To avoid long
  1058.      delays, this function does not search farther than
  1059.      `blink-matching-paren-distance' characters.
  1060.  
  1061.      Here is an example of calling this function explicitly.
  1062.  
  1063.           (defun interactive-blink-matching-open ()
  1064.             "Indicate momentarily the start of sexp before point."
  1065.             (interactive)
  1066.  
  1067.           (let ((blink-matching-paren-distance
  1068.                    (buffer-size))
  1069.                   (blink-matching-paren t))
  1070.               (blink-matching-open)))
  1071.  
  1072. 
  1073. File: lispref.info,  Node: Usual Display,  Next: Display Tables,  Prev: Blinking,  Up: Display
  1074.  
  1075. Usual Display Conventions
  1076. =========================
  1077.  
  1078.    The usual display conventions define how to display each character
  1079. code.  You can override these conventions by setting up a display table
  1080. (*note Display Tables::.).  Here are the usual display conventions:
  1081.  
  1082.    * Character codes 32 through 126 map to glyph codes 32 through 126.
  1083.      Normally this means they display as themselves.
  1084.  
  1085.    * Character code 9 is a horizontal tab.  It displays as whitespace
  1086.      up to a position determined by `tab-width'.
  1087.  
  1088.    * Character code 10 is a newline.
  1089.  
  1090.    * All other codes in the range 0 through 31, and code 127, display
  1091.      in one of two ways according to the value of `ctl-arrow'.  If it is
  1092.      non-`nil', these codes map to sequences of two glyphs, where the
  1093.      first glyph is the ASCII code for `^'.  (A display table can
  1094.      specify a glyph to use instead of `^'.)  Otherwise, these codes map
  1095.      just like the codes in the range 128 to 255.
  1096.  
  1097.    * Character codes 128 through 255 map to sequences of four glyphs,
  1098.      where the first glyph is the ASCII code for `\', and the others are
  1099.      digit characters representing the code in octal.  (A display table
  1100.      can specify a glyph to use instead of `\'.)
  1101.  
  1102.    The usual display conventions apply even when there is a display
  1103. table, for any character whose entry in the active display table is
  1104. `nil'.  Thus, when you set up a display table, you need only specify
  1105. the characters for which you want unusual behavior.
  1106.  
  1107.    These variables affect the way certain characters are displayed on
  1108. the screen.  Since they change the number of columns the characters
  1109. occupy, they also affect the indentation functions.
  1110.  
  1111.  - User Option: ctl-arrow
  1112.      This buffer-local variable controls how control characters are
  1113.      displayed.  If it is non-`nil', they are displayed as a caret
  1114.      followed by the character: `^A'.  If it is `nil', they are
  1115.      displayed as a backslash followed by three octal digits: `\001'.
  1116.  
  1117.  - Variable: default-ctl-arrow
  1118.      The value of this variable is the default value for `ctl-arrow' in
  1119.      buffers that do not override it.  *Note Default Value::.
  1120.  
  1121.  - User Option: tab-width
  1122.      The value of this variable is the spacing between tab stops used
  1123.      for displaying tab characters in Emacs buffers.  The default is 8.
  1124.      Note that this feature is completely independent from the
  1125.      user-settable tab stops used by the command `tab-to-tab-stop'.
  1126.      *Note Indent Tabs::.
  1127.  
  1128. 
  1129. File: lispref.info,  Node: Display Tables,  Next: Beeping,  Prev: Usual Display,  Up: Display
  1130.  
  1131. Display Tables
  1132. ==============
  1133.  
  1134.    You can use the "display table" feature to control how all 256
  1135. possible character codes display on the screen.  This is useful for
  1136. displaying European languages that have letters not in the ASCII
  1137. character set.
  1138.  
  1139.    The display table maps each character code into a sequence of
  1140. "runes", each rune being an image that takes up one character position
  1141. on the screen.  You can also define how to display each rune on your
  1142. terminal, using the "rune table".
  1143.  
  1144. * Menu:
  1145.  
  1146. * Display Table Format::    What a display table consists of.
  1147. * Active Display Table::    How XEmacs selects a display table to use.
  1148. * Character Descriptors::    Format of an individual element of a
  1149.                   display table.
  1150.  
  1151. 
  1152. File: lispref.info,  Node: Display Table Format,  Next: Active Display Table,  Up: Display Tables
  1153.  
  1154. Display Table Format
  1155. --------------------
  1156.  
  1157.    A display table is an array of 256 elements. (In FSF Emacs, a display
  1158. table is 262 elements.  The six extra elements specify the truncation
  1159. and continuation glyphs, etc.  This method is very kludgey, and in
  1160. XEmacs the variables `truncation-glyph', `continuation-glyph', etc. are
  1161. used.  *Note Truncation::.)
  1162.  
  1163.  - Function: make-display-table
  1164.      This creates and returns a display table.  The table initially has
  1165.      `nil' in all elements.
  1166.  
  1167.    The 256 elements correspond to character codes; the Nth element says
  1168. how to display the character code N.  The value should be `nil', a
  1169. string, a glyph, or a vector of strings and glyphs (*note Character
  1170. Descriptors::.).  If an element is `nil', it says to display that
  1171. character according to the usual display conventions (*note Usual
  1172. Display::.).
  1173.  
  1174.    If you use the display table to change the display of newline
  1175. characters, the whole buffer will be displayed as one long "line."
  1176.  
  1177.    For example, here is how to construct a display table that mimics the
  1178. effect of setting `ctl-arrow' to a non-`nil' value:
  1179.  
  1180.      (setq disptab (make-display-table))
  1181.      (let ((i 0))
  1182.        (while (< i 32)
  1183.          (or (= i ?\t) (= i ?\n)
  1184.              (aset disptab i (concat "^" (char-to-string (+ i 64)))))
  1185.          (setq i (1+ i)))
  1186.        (aset disptab 127 "^?"))
  1187.  
  1188. 
  1189. File: lispref.info,  Node: Active Display Table,  Next: Character Descriptors,  Prev: Display Table Format,  Up: Display Tables
  1190.  
  1191. Active Display Table
  1192. --------------------
  1193.  
  1194.    The active display table is controlled by the variable
  1195. `current-display-table'.  This is a specifier, which means that you can
  1196. specify separate values for it in individual buffers, windows, frames,
  1197. and devices, as well as a global value.  It also means that you cannot
  1198. set this variable using `setq'; use `set-specifier' instead.  *Note
  1199. Specifiers::. (FSF Emacs uses `window-display-table',
  1200. `buffer-display-table', `standard-display-table', etc. to control the
  1201. display table.  However, specifiers are a cleaner and more powerful way
  1202. of doing the same thing.  FSF Emacs also uses a different format for
  1203. the contents of a display table, using additional indirection to a
  1204. "glyph table" and such.  Note that "glyph" has a different meaning in
  1205. XEmacs.)
  1206.  
  1207.    Individual faces can also specify an overriding display table; this
  1208. is set using `set-face-display-table'.  *Note Faces::.
  1209.  
  1210.    If no display table can be determined for a particular window, then
  1211. XEmacs uses the usual display conventions.  *Note Usual Display::.
  1212.  
  1213. 
  1214. File: lispref.info,  Node: Character Descriptors,  Prev: Active Display Table,  Up: Display Tables
  1215.  
  1216. Character Descriptors
  1217. ---------------------
  1218.  
  1219.    Each element of the display-table vector describes how to display a
  1220. particular character and is called a "character descriptor".  A
  1221. character descriptor can be:
  1222.  
  1223. a string
  1224.      Display this particular string wherever the character is to be
  1225.      displayed.
  1226.  
  1227. a glyph
  1228.      Display this particular glyph wherever the character is to be
  1229.      displayed.
  1230.  
  1231. a vector
  1232.      The vector may contain strings and/or glyphs.  Display the
  1233.      elements of the vector one after another wherever the character is
  1234.      to be displayed.
  1235.  
  1236. `nil'
  1237.      Display according to the standard interpretation (*note Usual
  1238.      Display::.).
  1239.  
  1240.